<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
    <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
    <%
    	String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+request.getContextPath()+"/";
    %>
<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
		<link rel="stylesheet" type="text/css" href="<%=basePath %>/css/updateVideo.css" />
		<link rel="stylesheet" href="<%=basePath %>css/list.css">
		<link href="<%=basePath %>css/H-ui.min.css" rel="stylesheet" type="text/css" />
		<link href="<%=basePath %>/css/H-ui.min.css" rel="stylesheet" type="text/css" />
		<link href="<%=basePath %>/css/formsCSS.css" rel="stylesheet" type="text/css" />
		<script src="<%=basePath %>/js/jquery.min.js"></script>
		<script src="<%=basePath %>/js/formsJS.js"></script>
		<!-- kindeditor富文本编辑器 -->
		<link href="<%=basePath%>/kindeditor/themes/default/default.css">
		<link href="<%=basePath%>/kindeditor/plugins/code/prettify.css">
		<script src="<%=basePath%>/kindeditor/lang/zh-CN.js"></script>
		<script src="<%=basePath%>/kindeditor/kindeditor-all.js"></script>
		<script type="text/javascript">
			function check(f) {
				if(f.title.value.replace(/\s/g,'') == ''){
					alert("标题不能为空");
					return false;
				}
				return true;
			}
		</script>
    </head>
    <body>
    	<div class="connect_wrap">
    		<h3 style= "text-align: center;">常见问题维护</h3>
			<div class="row cl" style="max-width:88%;margin-left:8%;">
			<div class="labelText"></div>
	    		<form action="<%=basePath %>/question/questionOption" method="post" onsubmit="return check(this)" 
	    			enctype="multipart/form-data" >
			    		<div class="col-sm-4"></div>
				    		<div class="col-sm-4">
				    			<div class="boxs">
				    				 <c:if test="${type eq 'upd'}">
						    			<input type="text" class="inputBox" name="id" value="${question.id}" placeholder="编号" readonly="readonly" >
						    		</c:if>
					    			<input type="text" class="inputBox" name="title"  value="${question.title}" placeholder="标题">
					    			<br>
					    			<textarea  id="content" placeholder="内容详情" name="content" class="inputBox kindeditor" style="width: 90%;">${question.content}</textarea>
									 
					    			
					    			<input type="submit"  class="true" value="提交">
									<input type="button"  class="false" value="取消" onclick="window.history.go(-1)">
									
					</div>
				</div>
	    	</form>
    	</div>
    	</div>
    </body>
    
	<script src="<%=basePath %>js/jquery.min.js"></script>
    <script src="<%=basePath %>lib/My97DatePicker/WdatePicker.js"></script>
	<script src="<%=basePath %>js/H-ui.js"></script>
    <script>
	 	var editor;
	 	KindEditor.ready(function(K) {
	 		
	 	    editor = K.create('#content', {
	 	            uploadJson : '<%=basePath%>kindeditor/upload',       
	 	            fillDescAfterUploadImage: false,
	 	            allowImageRemote:false,
	 	            afterCreate : function() {
	 	                var self = this;
	 	                K.ctrl(document, 13, function() {
	 	                    self.sync();
	 	                });
	 	                K.ctrl(self.edit.doc, 13, function() {
	 	                    self.sync();
	 	                });
	 	            },
	 	            afterBlur:function(){ 
	 	                this.sync(); 
	 	            } 
	 	        });
	 	});  
    </script>
    
</html>
